/*
 *  $Id: WarriorsMonoliths.cs 1051 2010-05-18 22:10:41Z thenn.erannor $
 *	This file is a part of Ragima CCG.
 *	(C) 2008-2009 Ragima development group.
 *
 *	Licensed under the terms of the GNU GPL License version 2.
 *
 */

namespace Ragima.Cards001.Light.Lands {
    public class WarriorsMonoliths: LandCard {
        public WarriorsMonoliths(): base("001_l_l_warriors_monoliths") {
            Level = CompleteLevel.ReadyForTest;
            Element = ElementType.Light;
            Value = 100;
            AddManaCost(ElementType.Light, 1);
        }
        public override void SetNaturalAffects(ICollector<Affect> affects) {
            affects.Add(new Affects.ManaIncome(ElementType.Light, 1));
            affects.Add(new Affects.OnLandSummon(DoSummon, AffectSummaryType.Local));
        }

        private static void DoSummon(Land monoliths) {
            foreach (Creature cr in monoliths.Owner.GetCreatures())
                cr.AddAffect<WarriorsMonolithsAffect>();
        }

        private class WarriorsMonolithsAffect: SpellAffect<WarriorsMonoliths> {
            public WarriorsMonolithsAffect() {
                Add(new TimeAffect(4, new Affects.FlightBlock()));
            }

            public override bool Dispellable {
                get { return false; }
            }
        }
    }
}
